Casper CBC: CasperLabs implementation
createBlock
validate block
code: Validate.scala
for {
_ <- Validate.blockHashF(block) _ <- Validate.deployCountF(block) _ <- Validate.missingBlocksF(block, dag) _ <- Validate.timestampF(block, dag) _ <- Validate.repeatDeployF(block, dag) _ <- Validate.blockNumberF(block) _ <- Validate.justificationFollowsF(block, genesis, dag) _ <- Validate.parentsF(block, genesis, lastFinalizedBlockHash, dag) - <- Validate.sequenceNumberF(block, dag) - <- Validate.justificationRegressionsF(block, genesis, dag) _ <- Validate.shardIdentifierF(block, shardId) } yield ()
blockHash
check that blockHash matches the calculated block hash
deployCount
timestamp
repeatDeploy
missingBlocks
blockNumber
justificationFollows
parents
sequenceNumber
justificationRegressions
sharedIdentifier